package com.yhos.platform.oopston.core.validator;

import com.yhos.platform.oopston.core.utils.MessageSourceUtils;

import java.lang.annotation.Annotation;

public abstract class ConstraintValidator<A extends Annotation, T> {

    public MessageSourceUtils messageSourceUtils;

    public abstract void initialize(A constraintAnnotation);

    public abstract boolean isValid(T value);

    public void setMessageSourceUtils(MessageSourceUtils messageSourceUtils) {
        this.messageSourceUtils = messageSourceUtils;
    }

}
